package com.ytjj.qmyx.admin.eunm;

/**
 *快递公司枚举
 */
public enum ExpressNameCode {
    HAPPYLINK("happylink", "开心快递"),
    YZGUONEI("youzhengguonei", "邮政国内"),
    JIEBORNE("jieborne", "捷邦物流"),
    YUNDAKUAIYUN("yundakuaiyun", "韵达快运"),
    ZHONGTONG("zhongtong", "中通快递"),
    SHUNFENGHK("shunfenghk", "顺丰-繁体"),
    MOGUJIEORDER("mogujieorder", "蘑菇街"),
    GOMEORDER("gomeorder","国美"),
    AMAZONCNORDER("amazoncnorder", "亚马逊中国订单"),
    STOE56("stoe56", "申通快运"),
    BAISHIWULIU("baishiwuliu", "百世快运"),
    YUNDA("yunda", "韵达快递"),
    HUITONGKUAIDI("huitongkuaidi", "百世快递"),
    YUANTONG("yuantong", "圆通速递"),
    ZHAIJISONG("zhaijisong", "宅急送"),
    SHUNFENG("shunfeng", "顺丰速运"),
    SHENTONG("shentong", "申通快递"),
    JD("jd", "京东物流"),
    WEILURU("weiluru", "快递"),
    EMS("EMS", "ems");


    private String code;
    private String name;

    ExpressNameCode(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static String getExpressCompanyNo(String name){
        ExpressNameCode[] list = ExpressNameCode.values();
        for(ExpressNameCode item : list){
            if(item.getName().equals(name)){
                return item.getCode();
            }
        }
        return null;
    }

    public static String getExpressName(String code){
        ExpressNameCode[] list = ExpressNameCode.values();
        for(ExpressNameCode item : list){
            if(item.getCode().equals(code)){
                return item.getName();
            }
        }
        return null;
    }
}
